import {defineStore} from 'pinia'
import utils from '../utils'
export const useStore = defineStore('app', {
    actions: {
        showShareIndication(value) {
            console.log('appstore change',value)
            this.show_share_indication = value
        },
        setUserInfo(value) {
            this.userInfo = value
        },
        setRulePage(value) {
            this.rulePage = value
        }
    },
    state: () => {
        return {
            env: utils.getOperationEnvironment(),
            userInfo: {},
            // 展示小程序分享
            show_share_indication: false,
            rulePage: false
        }
    },
    
    getters: {
        env: state => state.env,
        
    }
})